<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .chart {
        width: 800px;
        height: 400px;
      }
    </style>
  </head>
  <body>
    <div class="chart"></div>
    <script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.1.2/echarts.min.js"></script>
    <script>
      const chart = echarts.init(document.querySelector('.chart'));

      const option = {
        title: {
          text: '折线图1',
        },
        xAxis: {
          data: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'],
        },
        yAxis: {},
        series: [
          {
            type: 'line',
            data: [11, 20, 15, 22, 8, 24, 28],
          },
          {
            type: 'bar',
            data: [15, 21, 16, 23, 10, 15, 22],
          },
          {
            type: 'pie',
            data: [
              {
                name: 'aaa',
                value: 11,
              },
              {
                name: 'bbb',
                value: 22,
              },
              {
                name: 'ccc',
                value: 33,
              },
            ],
            // 半径
            radius: [0, 30],
            // 圆心点坐标
            center: ['50%', 35],
          },
        ],
      };

      chart.setOption(option);
    </script>
  </body>
</html>
